//
// Created by 王筱童 on 2022/5/15.
//

#ifndef TINY_REDIS_SERVER_CMAKE_SENTI_MANAGER_H
#define TINY_REDIS_SERVER_CMAKE_SENTI_MANAGER_H
#include <asio.hpp>
#include <memory>

class redis_server;
class senti_manager {
private:
    std::unique_ptr<asio::ip::tcp::socket> master;
    redis_server *server;
    std::vector<std::pair<std::string,std::uint16_t>> slaves;
public:
    explicit senti_manager(redis_server* server);
    asio::awaitable<void> start(asio::ip::tcp::socket&& socket);
};


#endif //TINY_REDIS_SERVER_CMAKE_SENTI_MANAGER_H
